package src;

import java.util.ArrayList;
import java.util.Collections;

/**
 * Created by dell on 2017/7/28.
 */
public class SortTest {
    public static void main(String[] args) {
        ArrayList a=new ArrayList();
        a.add(-2);
        a.add(3);
        a.add(0);
        a.add(1);
        System.out.println(a);
        Collections.reverse(a);
        System.out.println(a);
        Collections.sort(a);
        System.out.println(a);
        Collections.shuffle(a);
        System.out.println(a);
        Collections.swap(a,0,2);
        System.out.println(a);
    }
}
